﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenBlog.IDAL;
using OpenBlog.DALFactory;
using OpenBlog.Entity;

namespace OpenBlog.BLL
{
    public class UsersBLL
    {
        private IUsersDAL usersDal = DataAccess.CreateUser();

        public bool ValidateUser(string id, string password)
        {
            Users user = usersDal.GetUserById(id);
            if (user.PASSWORD == null)
                return false;
            else
            {
                if (user.PASSWORD == password)
                    return true;
                else
                    return false;
            }
        }

        public void CreateUser(string name, string password, string email, 
            string sex, DateTime birthday, string image, string type)
        {
            
        }
    }
}
